<?xml version="1.0"?>
<rss version="2.0" xmlns:py="http://genshi.edgewall.org/"
                   xmlns:dc="http://purl.org/dc/elements/1.1/"
                   xmlns:xi="http://www.w3.org/2001/XInclude">
  <channel>
    <title>Latest announcements</title>
    <link>${req.abs_href('globalannoucements.xml')}</link>
    <description>${domain_name} announcements</description>
    <language>${req.locale and \
                '%s-%s' % (req.locale.language, req.locale.territory) or \
                'en-US'}</language>
    <generator>Trac ${trac.version}</generator>
    <image py:if="chrome.logo.src_abs">
      <title>Latest announcements</title>
      <url>${chrome.logo.src_abs}</url>
      <link>${req.abs_href('globalannoucements.xml')}</link>
    </image>

    <item py:for="event in events"
          py:with="abs_url = '%s%s%s%s' %(url_service, event['environment'], '/discussion/topic/', event['topic_id'])">
      <title>${'%s - %s' % (event['project'],
        plaintext(str(event['subject']),
        keeplinebreaks=False))
      }</title>
      <xi:include href="author_or_creator.rss" py:with="author = event['author']"/>
      <pubDate>${http_date(fromtimestamp(event['time']))}</pubDate>
      <link>${abs_url}</link>
      <guid isPermaLink="false">${abs_url}/${event.dateuid}</guid>
      <description>${
        event['body']
      }</description>
    </item>

   </channel>
</rss>
